import { defineConfig, presetIcons, transformerDirectives, transformerVariantGroup } from "unocss";
import { presetUni } from "@uni-helper/unocss-preset-uni";

export default defineConfig({
  rules: [
    ['scrollbar-hide', {
      '-ms-overflow-style': 'none', /* IE and Edge */
      'scrollbar-width': 'none' /* Firefox */
    }],
    ['bg-size-full', { "background-size": "100% 100%" }],
    [/^intrinsic-h-(\d+)$/, ([, d]) => ({ "content-visibility": "auto", "contain-intrinsic-height": `auto ${Number(d) / 4}rem` })]
  ],
  presets: [presetUni(), presetIcons({ warn: true, cdn: "https://esm.sh/", unit: "rem" })],
  transformers: [transformerDirectives(), transformerVariantGroup()],
});
